package com.xb.cloud.merchantapi.product.service;

import com.xb.cloud.gateway.client.RtnInfo;

public interface EndMerchantPassportUserService {
	/**
	 * 用户用以账号密码方式登录
	 * @Title loginWithPassword
	 * @param companyId
	 * @param phoneNum
	 * @param password
	 * @return
	 */
	RtnInfo loginWithPassword(long companyId, String phoneNum, String password);
	/**
	 * 用户退出
	 * @Title logout
	 * @param userToken
	 * @param autoUserToken
	 * @return
	 */
	RtnInfo logout(String userToken, String autoUserToken);

	/**
	 * 用户userToken过期后尝试使用autoUserToken自动登录
	 * @Title autoLogin
	 * @param autoUserToken
	 * @return
	 */
	public RtnInfo autoLogin(String autoUserToken);
	
	
	/**
	 * 短信验证码检查是否有效
	 * 
	 * @Title checkVerifyCode
	 * @param phone
	 * @param code
	 * @return
	 */
	public RtnInfo checkVerifyCode(long companyId, String phoneNum, String code);
	/**
	 * 用户手机短信重置密码
	 * 
	 * @Title resetPassword
	 * @param companyId
	 * @param phone
	 * @param passeord
	 * @return
	 */
	public RtnInfo resetPassword(long companyId, String phoneNum, String verifyCode, String password);
	/**
	 * 发送短信验证码
	 * 
	 * @Title sendSms
	 * @param phone
	 * @return
	 */
	RtnInfo sendSms(long companyId, String phoneNum);
	/**
	 * 注册用户
	 * @Title register
	 * @param companyId
	 * @param phoneNum
	 * @param verifyCode
	 * @param password
	 * @return
	 */
	RtnInfo register(long companyId, String phoneNum, String verifyCode, String password);
	/**
	 * 用户用以账号验证码方式登录  如不存在 创建用户初始化密码为空
	 * @Title loginWithVerifyCode
	 * @param companyId
	 * @param phoneNum
	 * @param verifyCode
	 * @return
	 */
	RtnInfo loginWithVerifyCode(long companyId, String phoneNum, String verifyCode);
	
	
}
